<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateRoutesTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateRoutesLabel_routeId}" for="routeId" />
                    <h:inputText id="routeId" value="#{routesController.selected.routeId}" title="#{bundle.CreateRoutesTitle_routeId}" required="true" requiredMessage="#{bundle.CreateRoutesRequiredMessage_routeId}"/>
                    <h:outputLabel value="#{bundle.CreateRoutesLabel_agencyId}" for="agencyId" />
                    <h:inputText id="agencyId" value="#{routesController.selected.agencyId}" title="#{bundle.CreateRoutesTitle_agencyId}" required="true" requiredMessage="#{bundle.CreateRoutesRequiredMessage_agencyId}"/>
                    <h:outputLabel value="#{bundle.CreateRoutesLabel_routeShortName}" for="routeShortName" />
                    <h:inputText id="routeShortName" value="#{routesController.selected.routeShortName}" title="#{bundle.CreateRoutesTitle_routeShortName}" required="true" requiredMessage="#{bundle.CreateRoutesRequiredMessage_routeShortName}"/>
                    <h:outputLabel value="#{bundle.CreateRoutesLabel_routeLongName}" for="routeLongName" />
                    <h:inputText id="routeLongName" value="#{routesController.selected.routeLongName}" title="#{bundle.CreateRoutesTitle_routeLongName}" required="true" requiredMessage="#{bundle.CreateRoutesRequiredMessage_routeLongName}"/>
                    <h:outputLabel value="#{bundle.CreateRoutesLabel_routeDesc}" for="routeDesc" />
                    <h:inputText id="routeDesc" value="#{routesController.selected.routeDesc}" title="#{bundle.CreateRoutesTitle_routeDesc}" />
                    <h:outputLabel value="#{bundle.CreateRoutesLabel_routeType}" for="routeType" />
                    <h:inputText id="routeType" value="#{routesController.selected.routeType}" title="#{bundle.CreateRoutesTitle_routeType}" required="true" requiredMessage="#{bundle.CreateRoutesRequiredMessage_routeType}"/>
                    <h:outputLabel value="#{bundle.CreateRoutesLabel_routeUrl}" for="routeUrl" />
                    <h:inputText id="routeUrl" value="#{routesController.selected.routeUrl}" title="#{bundle.CreateRoutesTitle_routeUrl}" />
                    <h:outputLabel value="#{bundle.CreateRoutesLabel_routeColor}" for="routeColor" />
                    <h:inputText id="routeColor" value="#{routesController.selected.routeColor}" title="#{bundle.CreateRoutesTitle_routeColor}" />
                    <h:outputLabel value="#{bundle.CreateRoutesLabel_routeTextColor}" for="routeTextColor" />
                    <h:inputText id="routeTextColor" value="#{routesController.selected.routeTextColor}" title="#{bundle.CreateRoutesTitle_routeTextColor}" />
                </h:panelGrid>
                <br />
                <h:commandLink action="#{routesController.create}" value="#{bundle.CreateRoutesSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{routesController.prepareList}" value="#{bundle.CreateRoutesShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateRoutesIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
